# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>
# Contributor: François Charette <firmicus ατ gmx δοτ net>

pkgname=perl-dbd-odbc
pkgver=1.61
pkgrel=2
pkgdesc="ODBC Driver for DBI"
arch=('loong64' 'x86_64')
url="https://search.cpan.org/dist/DBD-ODBC/"
license=('GPL' 'PerlArtistic')
depends=('perl-dbi' 'perl' 'unixodbc')
options=('!emptydirs')
source=("https://search.cpan.org/CPAN/authors/id/M/MJ/MJEVANS/DBD-ODBC-${pkgver}.tar.gz")
sha512sums=('cd20a505b64fd6a6d9a5158c134f9337a9f40879516e4fcb45270dcc20d88ade1ddcf856e36db72b8ca57e34052284f794532f55f0a1f6469cd3d8dff0103435')

build() {
  cd  DBD-ODBC-${pkgver}
  PERL_MM_USE_DEFAULT=1 perl Makefile.PL INSTALLDIRS=vendor
  make
}

package() {
  cd  DBD-ODBC-${pkgver}
  make install DESTDIR="$pkgdir"
  find "$pkgdir" -name '.packlist' -delete
  find "$pkgdir" -name '*.pod' -delete
}
